<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
    <head>
        <title>美业红</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1">
        <link href="http://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
        <link href="/public/css/main.css" rel="stylesheet">
        <script type='text/javascript' src='/public/js/jquery-3.1.1.min.js'></script>
        <script type="text/javascript" src='/public/js/jquery.validate.js'></script>
        <script type="text/javascript" src='/public/js/main/main.js'></script>
        <script>
            var _hmt = _hmt || [];
            (function () {
                var hm = document.createElement("script");
                hm.src = "//hm.baidu.com/hm.js?8d43b5b5d798921b66d689f7a792e6e2";
                var s = document.getElementsByTagName("script")[0];
                s.parentNode.insertBefore(hm, s);
            })();
        </script>
        <script type="text/javascript">
            document.domain = '<?php echo _DOMAIN_ALL_;?>';
        </script>
        <link rel="shortcut icon" type="image/ico" href="/favicon.ico">
    </head>
    <body style="background-color: #f4f4f4;">
        <div class="navigation">
            <div class='navlogo'>
            <a href='/'><img class='_navlogo' src="/public/images/logo.png"></a>
            </div>
            <div class='navson'>
                <ul class='fr'>
                <li><a href='/' class='anchor'><b>主页</b></a></li>
                <li><a href="/home/store" class='anchor'><b>店铺</b></a></li>
                <li><a href="/home/barber" class='anchor'><b>成员</b></a></li>
                <li><a href="/home/action" class='anchor'><b>活动</b></a></li>
                <li><a href="/home/order" class='anchor'><b>订单</b></a></li>
                <li><a href="/home/coupon" class='anchor'><b>优惠券</b></a></li>
                <li><a href="/home/goods" class='anchor'><b>商品</b></a></li>
                </ul>
           </div>
            <?php if($_SESSION['id']>0){?>
            <div style="float:right;padding-right:10%">你好:<span id='login_name'></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class='anchor' href='/home/passport/repassword'>修改密码</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class='anchor' href='/home/passport/logout'>退出</a></div>
            <?php }?>
        </div>
        <div style='margin-top:80px;width:100%'>
            <img class='_navlogo' src="/public/images/contentlogo.png" style='width:100%;height:100px'>
        </div>
        <div class='container'>
            <div class='_main'>
            <div class='_line'></div> 
<div class="_contro">
    <select id="store_id" onchange="search();">
        <option value='0'>全部店铺</option>
        <?php foreach($store as $v){?>
        <option value='<?php echo $v['id'];?>' <?php if($store_id==$v['id']){echo "selected='selected'";}?>><?php echo $v['name'];?></option>
        <?php }?>
    </select>&nbsp;&nbsp;&nbsp;&nbsp;
    <a href="/home/barber/create" class="_a"><font class="_font"><b>+</b>添加发型师</font></a>
</div>
<div class='_cut'></div>
<div id='content'>
    <?php foreach($Barbers as $k=>$v){ ?>
    <?php if($k%3==0){?>
    <div class='row'>
        <?php } ?>
        <div class='col-sm-3 col-md-4 full'>
            <div class='thumbnail' style="margin-bottom:10px">
                <div style="height:11.5rem;">
                    <div class='caption '>
                        <div style='float:left;margin-left:-0.5rem;margin-top:-0.7rem;'>
                            <span ><img style='height:11rem;border-radius:50%;overflow:hidden;' src='<?php echo $v['photo'];?>' ></span>
                        </div>
                        <div class='_ling_div' style='color:black;font-size:12px;'>
                            <div style='padding-top:0.4rem'>
                                <span>姓名：<?php echo $v['name'];?></span>
                            </div>
                            <div style='padding-top:0.4rem'>
                                <span>性别：<?php if($v['sex']==0){echo "男";}else{echo "女";};?></span>
                            </div>
                            <div style='padding-top:0.4rem'>
                                <span>手机号：<?php echo $v['mobile'];?></span>
                            </div>
                            <div style='padding-top:0.4rem;'>
                                <span>级别：<?php echo $v['level'];?></span>
                            </div>
                            <div style='padding-top:0.4rem;overflow: hidden;'>
                                <span>店铺：<?php echo $v['store_name'];?></span>
                            </div>
                        </div>
                    </div> 
                </div>            
            </div>
            <input type="hidden" value="<?php echo $v['id'];?>" id="Barbers_id">
            <a href="/home/barber/create?id=<?php echo $v['id']?>">修改</a> 
            <a href="/home/barber/delete?id=<?php echo $v['id']?>" onclick="return confirmAct();">删除</a>
        </div> 
        <?php if(($k+1)%3==0 || $Barbers[$k+1]['id']<1){?>
    </div>
    <?php } ?>
    <?php } ?>
</div>
<script type="text/javascript" language="javascript">
    function search(){
        var store_id = $('#store_id').val();
        window.location.href = '/home/barber?store_id='+store_id;
    }
    function confirmAct()
    {
        if (confirm('确定要执行删除吗?'))
        {
            return true;
        }
        return false;
    }
</script> 
</div>
</div>
<div class='_line'></div>
<div class="newfooter">
    ©2015-2017 All Rights Reserved ( 京ICP备15010043号 ) 
</div>
<div id='mask_layer' style="text-align: center;width:100%;height:100%;overflow:hidden;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#8E8E8E',endColorstr='##8E8E8E');
     background-color:rgba(255, 255, 255, 0.4);position:fixed; _position:absolute; top:0;left:0; z-index:5000;display:none ">
    <div style="padding-top: 20%"><h1><b>loading<span id="_loading"></span></b></h1></div>
</div>
</body>
<script type="text/javascript" src='/public/js/top.js'></script>
</html>